<?php
/**
 * @arr             array
 *  $k              指定的$arr[][$k]
 *  $v              指定的$arr[][$v]
 * @return          $key/false（注意，如果key是0的时候需要特别处理）
 */
 function ArrayOne($arr, $k, $v)
{
    foreach ($arr as $key => $value) {
        if ($value[$k] == $v) {
            return $key;
            break;
        } else {
            if (count($arr) == $key + 1) {
                return false;
                break;
            }
            continue;
        }
    }
}
$array='{"healthy_collector_number":"323"}';
$array= json_decode($array,true);

$Intype2Key=array('healthy_collector_number','healthy_combo_name','sample_name','healthy_combo_price','collector_received_time');
$type=1;
//得到里面的key
foreach($array as $key=>$value){
    if(in_array($key,$Intype2Key)){
        $type=2;
        break;
    }
}

 var_dump($type);


